<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:86:"D:\phpStudy\PHPTutorial\WWW\anbo\tp5\public/../application/admin\view\login\login.html";i:1605188417;}*/ ?>
<!doctype html>
<html  class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <title>后台登录-X-admin2.2</title>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="stylesheet" href="/anbo/tp5/public/static/admin/css/font.css">
    <link rel="stylesheet" href="/anbo/tp5/public/static/admin/css/login.css">
      <link rel="stylesheet" href="/anbo/tp5/public/static/admin/css/xadmin.css">
    <script type="text/javascript" src="/anbo/tp5/public/static/admin/js/jquery.min.js"></script>
    <script src="/anbo/tp5/public/static/admin/lib/layui/layui.js" charset="utf-8"></script>
    <!--[if lt IE 9]>
      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

    <link href="/anbo/tp5/public/static/login/css/styles.css" rel="stylesheet" type="text/css" />
</head>
<body class="login-bg">
    
    <div class="login" style="width: 110vw;height: 500px;">
        <!-- <div class="message">考试系统测试版</div> -->
        <div class='login_title'>
        <h1 style="margin: -10px 0 5px 0;text-align: center;color:#fff;opacity:0.7;">考试系统测试版</h1>
        </div>
        <!-- <div id="darkbannerwrap"></div> -->
        
        <form method="post"  class="layui-form" >
            <input name="username" placeholder="用户名" style="opacity: 0.5;" type="text" lay-verify="required" class="layui-input" >
            <hr class="hr1">
            <input name="password" lay-verify="required" style="opacity: 0.5;" placeholder="密码"  type="password" class="layui-input">
            <hr class="hr1">
            <input name="captcha" placeholder="验证码" style="opacity: 0.5;" type="text" lay-verify="required" class="layui-input" >
            <hr class="hr1">
            <img id="captcha"  src="<?php echo url('Login/verify'); ?>" onclick="recaptcha()" alt="看不清楚，换一张" width="220px" height="50px" style="opacity: 0.7;"/>
            <hr class="hr1">
            <input  value="登录" style="background: #8080a0;" lay-submit lay-filter="login" style="width:100%;" type="submit" >
            <!-- <hr class="hr20" > -->
        </form>
    </div>
  


    

    <script>
        $(function  () {
            layui.use('form', function(){
              var form = layui.form;
              // layer.msg('玩命卖萌中', function(){
              //   //关闭后的操作
              //   });
              //监听提交
              form.on('submit(login)', function(data){
                // alert(888)
                // layer.msg(JSON.stringify(data.field),function(){
                //     location.href='index.html'
                    
                // });
                console.log(data.field);

                $.post("<?php echo url('Login/login'); ?>",{data:data.field},
                    function(data){
                        if(data.code == 0){
                            layer.msg(data.msg);
                            console.log(data.msg)
                            // console.log(data)
                        }
                        if(data.code == 1){
                            layer.msg(data.msg);
                            console.log(data.msg)
                            location.href="<?php echo url('Index/index'); ?>"
                        }
                    })
                return false;
              });
            });
        })
        function recaptcha(){
            var captcha = document.getElementById("captcha");
            captcha.src = "<?php echo url('Login/verify')."?".time(); ?>"
        }
    </script>
    <!-- 底部结束 -->
    <script type="text/javascript" src="/anbo/tp5/public/static/login/img/ThreeWebGL.js"></script>
<script type="text/javascript" src="/anbo/tp5/public/static/login/img/ThreeExtras.js"></script>
<script type="text/javascript" src="/anbo/tp5/public/static/login/img/Detector.js"></script>
<script type="text/javascript" src="/anbo/tp5/public/static/login/img/RequestAnimationFrame.js"></script>
<script id="vs" type="x-shader/x-vertex">
            varying vec2 vUv; void main() { vUv = uv; gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); }
        </script>
<script id="fs" type="x-shader/x-fragment">
            uniform sampler2D map; uniform vec3 fogColor; uniform float fogNear; uniform float fogFar; varying vec2 vUv; void main() { float depth = gl_FragCoord.z / gl_FragCoord.w; float fogFactor = smoothstep( fogNear, fogFar, depth ); gl_FragColor = texture2D( map, vUv ); gl_FragColor.w *= pow( gl_FragCoord.z, 20.0 ); gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor ); }

        </script>
<script type="text/javascript">
            if(!Detector.webgl) Detector.addGetWebGLMessage();
            var canvas = document.createElement('canvas');
            canvas.width = 32;
            canvas.height = window.innerHeight;
            var context = canvas.getContext('2d');
            var gradient = context.createLinearGradient(0, 0, 0, canvas.height);
            gradient.addColorStop(0, "#1e4877");
            gradient.addColorStop(0.5, "#4584b4");
            context.fillStyle = gradient;
            context.fillRect(0, 0, canvas.width, canvas.height);
            document.body.style.background = 'url(' + canvas.toDataURL('image/png') + ')';
            var container;
            var camera, scene, renderer, sky, mesh, geometry, material, i, h, color, colors = [],
                sprite, size, x, y, z;
            var mouseX = 0,
                mouseY = 0;
            var start_time = new Date().getTime();
            var windowHalfX = window.innerWidth / 2;
            var windowHalfY = window.innerHeight / 2;
            init();
            animate();

            function init() {
                container = document.createElement('div');
                document.body.appendChild(container);
                camera = new THREE.Camera(30, window.innerWidth / window.innerHeight, 1, 3000);
                camera.position.z = 6000;
                scene = new THREE.Scene();
                geometry = new THREE.Geometry();
                var texture = THREE.ImageUtils.loadTexture('');
                texture.magFilter = THREE.LinearMipMapLinearFilter;
                texture.minFilter = THREE.LinearMipMapLinearFilter;
                var fog = new THREE.Fog(0x4584b4, -100, 3000);
                material = new THREE.MeshShaderMaterial({
                    uniforms: {
                        "map": {
                            type: "t",
                            value: 2,
                            texture: texture
                        },
                        "fogColor": {
                            type: "c",
                            value: fog.color
                        },
                        "fogNear": {
                            type: "f",
                            value: fog.near
                        },
                        "fogFar": {
                            type: "f",
                            value: fog.far
                        },
                    },
                    vertexShader: document.getElementById('vs').textContent,
                    fragmentShader: document.getElementById('fs').textContent,
                    depthTest: false
                });
                var plane = new THREE.Mesh(new THREE.Plane(64, 64));
                for(i = 0; i < 8000; i++) {
                    plane.position.x = Math.random() * 1000 - 500;
                    plane.position.y = -Math.random() * Math.random() * 200 - 15;
                    plane.position.z = i;
                    plane.rotation.z = Math.random() * Math.PI;
                    plane.scale.x = plane.scale.y = Math.random() * Math.random() * 1.5 + 0.5;
                    GeometryUtils.merge(geometry, plane)
                }
                mesh = new THREE.Mesh(geometry, material);
                scene.addObject(mesh);
                mesh = new THREE.Mesh(geometry, material);
                mesh.position.z = -8000;
                scene.addObject(mesh);
                renderer = new THREE.WebGLRenderer({
                    antialias: false
                });
                renderer.setSize(window.innerWidth, window.innerHeight);
                container.appendChild(renderer.domElement);
                document.addEventListener('mousemove', onDocumentMouseMove, false);
                window.addEventListener('resize', onWindowResize, false)
            }

            function onDocumentMouseMove(event) {
                mouseX = (event.clientX - windowHalfX) * 0.25;
                mouseY = (event.clientY - windowHalfY) * 0.15
            }

            function onWindowResize(event) {
                camera.aspect = window.innerWidth / window.innerHeight;
                camera.updateProjectionMatrix();
                renderer.setSize(window.innerWidth, window.innerHeight)
            }

            function animate() {
                requestAnimationFrame(animate);
                render()
            }

            function render() {
                position = ((new Date().getTime() - start_time) * 0.03) % 8000;
                camera.position.x += (mouseX - camera.target.position.x) * 0.01;
                camera.position.y += (-mouseY - camera.target.position.y) * 0.01;
                camera.position.z = -position + 8000;
                camera.target.position.x = camera.position.x;
                camera.target.position.y = camera.position.y;
                camera.target.position.z = camera.position.z - 1000;
                renderer.render(scene, camera)
            }
        </script>
</body>
</html>